<template>
  <div class="codeView">
    <MDEdit :value="mdValue" :handle-change="handleMdChange" />
    <CodeEditor :value="codeValue" :handle-change="handleCodeChange" />
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

import MDEdit from "@/components/MDEdit.vue";
import CodeEditor from "@/components/CodeEditor.vue"; // @ is an alias to /src
const mdValue = ref();
const codeValue = ref();
const handleCodeChange = (v: string) => {
  codeValue.value = v;
  console.log(v);
};
const handleMdChange = (v: string) => {
  mdValue.value = v;
};
</script>
